<template>
  <div class="pop-view">
    <div class="pop-title">XSpace</div>
    <el-timeline class="pop-time-line">
      <el-timeline-item center color="05F292">
        <template #dot>
          <div class="item-left-label">1</div>
        </template>
        <el-card class="card-item">
          <div class="item-value label-white">Open MEMO Twitter page:</div>
          <div class="item-value label-green url-btn" @click="goToView">https://x.com/MemoLabsOrg</div>
        </el-card>
      </el-timeline-item>
      <el-timeline-item center color="05F292">
        <template #dot>
          <div class="item-left-label">2</div>
        </template>
        <el-card class="card-item">
          <div class="item-value label-white">Find the <span class="label-green">xSpace</span> plugin icon on the right side of the page and click it</div>
        </el-card>
      </el-timeline-item>
      <el-timeline-item center color="05F292">
        <template #dot>
          <div class="item-left-label">3</div>
        </template>
        <el-card class="card-item">
          <div class="item-value label-white"><span class="label-green">Connect your wallet</span> and start your AI Data journey</div>
        </el-card>
      </el-timeline-item>
    </el-timeline>
    <img src="@/assets/pop-bottom.jpeg" alt="" class="pop-bottom-img">
  </div>
</template>

<script setup>

const goToView = () => {
  chrome.tabs.create({ url: 'https://memo-mini.vercel.app/' })
}

</script>

<style lang="less">
  body {
    background: #00110A;
  }
</style>

<style lang="less" scoped>
  .pop-view {
    width: 400px;
    box-sizing: border-box;
    border: 30px;
    padding: 10px 18px;
    background: linear-gradient(180deg, #000402, #00110A);

    .pop-time-line {
      margin-top: 17px;
      padding-inline-start: 0;

      & ::v-deep(.el-timeline-item) {
        padding-bottom: 5px;
      }

      & ::v-deep(.el-timeline-item__tail) {
        border-left-color: #05F292;
      }
    }

    .pop-title {
      color: #fff;
      line-height: 38px;
      font-size: 24px;
    }

    .item-left-label{
      width: 20px;
      height: 20px;
      border-radius: 10px;
      line-height: 20px;
      text-align: center;
      font-size: 10px;
      color: #000;
      background-color: #05F292;
      position: relative;
      left: -5px;
    }
    .card-item {
      background-color: #021B12;
      border: none;

      & ::v-deep(.el-card__body) {
        padding: 17px 20px;
      }
    }

    .item-label {
      font-size: 12px;
      line-height: 17px;
    }

    .label-white {
      color: #fff;
    }

    .label-green {
      color: #05F292;
    }
  }
  .popup-header {
    width: 400px;
    height: 100px;
    color: #333;
  }
  .url-btn {
    cursor: pointer;
  }
  .pop-bottom-img {
    margin-top: 20px;
    width: 365px;
    object-fit: cover;
    border-radius: 8px;
    overflow: hidden;
  }
</style>